package com.zhangkunhao.notes.entity.bo;

import java.util.List;


/**
 * 封装返回给前端的对象
 *
 * @author 20642
 */
public class PageBean<T> {
    /**
     * 分页查询的总条目数量
     */
    private Integer totalCount;
    /**
     * 返回的查询的集合对象
     */
    private List<T> rows;

    public PageBean() {
    }

    public PageBean(Integer totalCount, List<T> rows) {
        this.totalCount = totalCount;
        this.rows = rows;
    }

    /**
     * 获取
     *
     * @return totalCount
     */
    public Integer getTotalCount() {
        return totalCount;
    }

    /**
     * 设置
     *
     * @param totalCount：集合的大小
     */
    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    /**
     * 获取
     *
     * @return rows
     */
    public List<T> getRows() {
        return rows;
    }

    /**
     * 设置
     *
     * @param rows：返回给前端的集合
     */
    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    @Override
    public String toString() {
        return "PageBean{totalCount = " + totalCount + ", rows = " + rows + "}";
    }
}
